A metamodel is a data model that selects and structures the data for a specific purpose. By selecting specific data and viewing it in a specific way, the metamodel can decrease the time required by, and eliminate unnecessary detail from, an activity. For example, consider an aerial photograph that shows every road, street, driveway, and backyard swimming pool in a given geographical area. This view, or metamodel, might be quite valuable in observing changes to a neighborhood over time. In contrast, a street map of the same area might be an excellent metamodel for a tourist trying to find a particular address, and an aeronautical chart may help a private pilot pinpoint her destination airport. The underlying information or data (in this case, every physical thing in the geographical area) is exactly the same, but each metamodel (the aerial photograph, the street map, and the aeronautical chart) provides a different view of the data that is selected (e.g., no backyard swimming pools on the aeronautical chart) and structured (e.g., street names printed and major roads shown in color on the street map) to facilitate a specific purpose. Imagine how cumbersome it might be for tourists to find their way around with an aerial photograph. Thus, the metamodel eliminates unnecessary data from the view and provides more rapid access and processing of the information.
The metamodel may serve as a schema (i.e., structured framework or plan) for storing and organizing data—enabling the schema to define the organization of the data. For example, the metamodel may organize the data in a tree-like, hierarchical structure. In this type of structure, a piece of data is referred to as a “node,” and nodes may be defined to have relationships (also referred to as associations, links, or paths) that link nodes to each other. For example, nodes may be referred to as parent nodes and child nodes. The parent node may be related to one or more child nodes. Moreover, the parent node may be higher in the hierarchy than a child node. For example, in a customer database, customer information may be organized as a parent node and a sales order associated with the customer may be organized as a child node. The child node, in this example a sales order, includes sales order information, such as products ordered, product descriptions, delivery dates, ship dates, and the like. In a metamodel, the relationship between a two nodes is given an explicit name (e.g., “ExecutedOrders”) which can then be used to refer to all node sets related in the same way. This is referred to as a “named relationship”. As used herein, the phrase “metamodel data” refers to data organized according to a schema or plan.
Metamodel data may be stored in a database to allow a user to perform a query of the metamodel data. A query is the primary mechanism for retrieving information from a database and consists of questions presented to the database in a predefined format. For example, some databases use the Structured Query Language (SQL) to retrieve metamodel data or portions of that data. XPath is a query language which is used to perform queries on XML (eXtensible Markup Language) documents. XPath may also be adapted for use with metamodel data. XML is an extensible markup language which is used to describe data.
Past approaches for querying data, which can be used with metamodel data, may be limited in the types of queries that can be performed. In particular, these approaches may only allow the computer to access data according to the named relationships (or associations) that are defined in the metamodel. For example, in a metamodel that identifies a human and a pet living in each house on a street with the named relationship name “HumansPets”, the computer may identify the pets living with the human “Bob” because the named relationship of “HumansPets” is defined in the metamodel and specified in the query. However, using past query tools, the computer would not be able to identify the pets living next door to the human “Bob” because the metamodel did not define the neighbors, only “HumansPets” and the query can only search on specified named relationships. If a relationship between two pieces of data (or nodes) is not defined in the metamodel, there may be no way of accessing the data in a query. In addition, querying data may only be executed in one direction, such as from a parent node to a child node using the defined and named relationship between the nodes. Querying the data from a child node to a parent node may not be possible using past approaches to querying a metamodel. Also, past approaches may require the computer system to test every piece of data to determine if it answers the query. Moreover, there may be no mechanism to stop the query process once a positive result is reached (i.e., a result that answers the query). In addition, it may be necessary at times for an application to call itself to complete a query. This type of recursive query may not be possible with past approaches. In view of the foregoing, there is a need to improve past approaches of accessing data associated with a metamodel.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as described. Further features and/or variations may be provided in addition to those set forth herein. For example, the present invention may be directed to various combinations and subcombinations of the disclosed features and/or combinations and subcombinations of several further features disclosed below in the detailed description.